package com.qianda.qdminiapp.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianda.qdminiapp.domain.dto.PageRequest;
import com.qianda.qdminiapp.domain.model.account.QqdAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qianda.qdminiapp.domain.model.account.QqdAccountTrade;
import com.qianda.qdminiapp.domain.model.order.QqdOrderInfo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 账户表 服务类
 * </p>
 *
 * @author cw
 * @since 2019-08-14
 */
public interface QqdAccountService extends IService<QqdAccount> {

    /*
     * 查询用户账户信息
     * @Description
     * @Author cw
     * @Date 15:05 2019/9/2
     * @Param [userId]
     * @return com.qianda.qdminiapp.domain.model.account.QqdAccount
     **/
    QqdAccount findAccount(Long userId);

    /*
     *  查询用户交易信息
     * @Description
     * @Author cw
     * @Date 15:06 2019/9/2
     * @Param [userId]
     * @return java.util.List<com.qianda.qdminiapp.domain.model.account.QqdAccountTrade>
     **/
    IPage<QqdAccountTrade> findTradeList(Long userId, PageRequest pageRequest);

    /*
     *  账户充值
     * @Description
     * @Author cw
     * @Date 14:41 2019/9/17
     * @Param [userId, rechargeAmt]
     * @return void
     **/
    Map<String, Object> recharge(Long userId, BigDecimal rechargeAmt);

    /*
     * 充值成功后续处理
     * @Description
     * @Author cw
     * @Date 17:02 2019/9/17
     * @Param [qqdOrderInfo]
     * @return void
     **/
    void rechargeOrder(QqdOrderInfo qqdOrderInfo);



}
